Skip to content

feat(embedding): add opt-in Nomic task prefixes - #199

Merged
tickernelz merged 2 commits into
tickernelz:mainfrom
EyJunge1:feat/embedding-task-prefixes
Jul 30, 2026
Merged

feat(embedding): add opt-in Nomic task prefixes#199
tickernelz merged 2 commits into
tickernelz:mainfrom
EyJunge1:feat/embedding-task-prefixes

Conversation

@EyJunge1

@EyJunge1 EyJunge1 commented Jul 28, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Implements feat: Add optional task-specific prefixes for nomic-embed-text-v1.5 #98 with an opt-in embeddingUseTaskPrefixes config flag (default false).
  • Applies Nomic-style search_document: / search_query: prefixes at store and query call sites when enabled.
  • Documents that existing memories should be re-indexed after enabling so store and query vectors stay aligned.

Test plan

  • bun test tests/embedding-task-prefixes.test.ts tests/config.test.ts (32 pass)
  • Confirm default behavior is unchanged with embeddingUseTaskPrefixes unset/false (default false + prefix helper leaves text unchanged when disabled)
  • Confirm document/query prefixes are applied when enabled (search_document: / search_query: unit coverage; call sites pass { task: "document" | "query" })
  • Confirm README/config guidance mentions the re-index requirement after enabling

EyJunge1 and others added 2 commits July 28, 2026 14:46
Allow search_document:/search_query: prefixes via embeddingUseTaskPrefixes so Nomic models can use their recommended task instructions without changing the default index format.

Co-authored-by: Cursor <cursoragent@cursor.com>
Remove the duplicated progress callback fragment introduced while rebasing task-prefix support onto the latest migration safety changes.

Co-authored-by: Cursor <cursoragent@cursor.com>
@EyJunge1
EyJunge1 force-pushed the feat/embedding-task-prefixes branch from c4e3628 to 2c0daf9 Compare July 28, 2026 12:47
@tickernelz
tickernelz merged commit b7d0094 into tickernelz:main Jul 30, 2026
8 checks passed
@tickernelz

Copy link
Copy Markdown
Owner

Merged into main as part of the newest-to-oldest integration batch and scheduled for the v2.22.0 release.

The combined four-PR tree was verified with:

  • bun install --frozen-lockfile
  • cd web && bun install --frozen-lockfile
  • bun run typecheck
  • bun run build (including the React/Vite production bundle)
  • bun test287 passed / 0 failed / 631 assertions
  • git diff --check

The pushed main tree exactly matches the locally tested synthetic merge tree.

@tickernelz

Copy link
Copy Markdown
Owner

Released in v2.22.0. The npm registry artifact was downloaded, checksum-verified, installed with lifecycle scripts disabled, and passed native dependency, libSQL vector, package entrypoint, and bundled web UI checks.

@EyJunge1
EyJunge1 deleted the feat/embedding-task-prefixes branch July 30, 2026 09:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants